System and method for context-sensitive help in a design environment

ABSTRACT

An intelligent tool for assisting a developer during the creation or maintenance of software generates an icon when triggered by input. Upon selection of the icon, options are displayed for potential selection. Upon selection of an entry, event associated with the entry are deployed.

FIELD OF THE INVENTION

[0001] This invention relates to the field of computing and inparticular to the field of development tools.

BACKGROUND

[0002] Programming languages have become more powerful over time throughthe addition of features and capabilities. The increased power andcapability of languages has been accompanied by an increase incomplexity. As software increases in complexity, the development ofsoftware is becoming more and more difficult. Source code may exceedhundreds of pages in length and may involve the use of many differentsource code files and programming libraries. The number and complexityof functions available to a software developer has greatly increased.For example, multiple functions or methods within a class hierarchy mayshare the same name (or identifier), but have different numbers ofparameters or different parameter types. A large number of identifiersmay be used, including typedefs, variables, macros, parameters,namespaces, templates, attributes and so on. Each of these identifierstypically requires a type declaration and/or definition specified. Henceprogramming tools that make development efforts easier and more accurateare widely desired.

[0003] One way to make the task of the developer more manageable is toestablish an Integrated Development Environment (IDE). Theseenvironments typically include browsers and editors enabling developersto edit multiple source files. For object oriented languages, the IDEmay also provide a browser that enables a developer to navigate and viewthe class hierarchy. To further assist the programming effort an IDE maysupport some kind of on-line statement building mechanism such as theone described in U.S. Pat. No. 6,311,323 B1 issued Oct. 30, 2001,entitled “Computer Programming Language Statement Building andInformation Tool”. A help information mechanism may enable a developerto refer to on-line documentation describing varying functiondefinitions. In addition, an IDE may provide automatic help modulesdisplaying reference information associated with identifiers and so on,as described in U.S. patent application Ser. No. 09/191,757, filed Nov.13, 1998, entitled “Automated Help Information for ReferenceInformation”. A completion module for auto-completion of programmingstatements may also be available within the IDE, as described in U.S.Pat. No. 6,305,008 B1, issued Oct. 16, 2001 entitled, “AutomaticStatement Completion”. Such a tool may be invoked as a developer iswriting code, and may display a list of potential completion candidatesto the developer. The developer may then pick the desired candidate orcontinue typing, freeing the developer from having to consult printed oron-line documentation, class hierarchies or other source code files.

[0004] To date however, a tool that can intelligently understand whatthe user (e.g., developer) is doing and help the user accomplish thenext set of tasks is not known. It would be helpful if there were a toolthat could track the intentions of a user and proffer up a list ofoptions of potential next tasks, based on the user's action.

SUMMARY OF THE INVENTION

[0005] A context-sensitive design time tool monitors user input during aprogram development or program maintenance operation and displays anicon when user input triggers a potential next task or tasks. Uponselection of the icon, the tool proffers a list of possible next tasks.Upon selection of an entry in the list, the task is automaticallyperformed.

BRIEF DESCRIPTION OF THE DRAWINGS

[0006] The foregoing summary, as well as the following detaileddescription of preferred embodiments, is better understood when read inconjunction with the appended drawings. For the purpose of illustratingthe invention, there is shown in the drawings exemplary constructions ofthe invention; however, the invention is not limited to the specificmethods and instrumentalities disclosed. In the drawings:

[0007]FIG. 1 is a block diagram of an exemplary computing environment inwhich aspects of the invention may be implemented;

[0008]FIG. 2 is a block diagram of a system that generates acontext-sensitive list of potential next tasks in accordance with oneembodiment of the invention;

[0009]FIG. 3 is a block diagram illustrating a representative screenshot of a section of source code in an editor, showing the appearance ofan icon in accordance with one aspect of the invention;

[0010]FIG. 4 is a block diagram illustrating a representative screenshot of a section of source code in an editor, showing a list ofpotential tasks in accordance with one aspect of the invention; and

[0011]FIG. 5 is a flow diagram of a method for generating acontext-sensitive list of potential next tasks in accordance with oneembodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

[0012] Exemplary Computing Environment

[0013]FIG. 1 and the following discussion are intended to provide abrief general description of a suitable computing environment in whichthe invention may be implemented. It should be understood, however, thathandheld, portable, and other computing devices of all kinds arecontemplated for use in connection with the present invention. While ageneral purpose computer is described below, this is but one example,and the present invention requires only a thin client having networkserver interoperability and interaction. Thus, the present invention maybe implemented in an environment of networked hosted services in whichvery little or minimal client resources are implicated, e.g., anetworked environment in which the client device serves merely as abrowser or interface to the World Wide Web.

[0014] Although not required, the invention can be implemented via anapplication programming interface (API), for use by a developer, and/orincluded within the network browsing software which will be described inthe general context of computer-executable instructions, such as programmodules, being executed by one or more computers, such as clientworkstations, servers, or other devices. Generally, program modulesinclude routines, programs, objects, components, data structures and thelike that perform particular tasks or implement particular abstract datatypes. Typically, the functionality of the program modules may becombined or distributed as desired in various embodiments. Moreover,those skilled in the art will appreciate that the invention may bepracticed with other computer system configurations. Other well knowncomputing systems, environments, and/or configurations that may besuitable for use with the invention include, but are not limited to,personal computers (PCs), automated teller machines, server computers,hand-held or laptop devices, multi-processor systems,microprocessor-based systems, programmable consumer electronics, networkPCs, minicomputers, mainframe computers, and the like. The invention mayalso be practiced in distributed computing environments where tasks areperformed by remote processing devices that are linked through acommunications network or other data transmission medium. In adistributed computing environment, program modules may be located inboth local and remote computer storage media including memory storagedevices.

[0015]FIG. 1 thus illustrates an example of a suitable computing systemenvironment 100 in which the invention may be implemented, although asmade clear above, the computing system environment 100 is only oneexample of a suitable computing environment and is not intended tosuggest any limitation as to the scope of use or functionality of theinvention. Neither should the computing environment 100 be interpretedas having any dependency or requirement relating to any one orcombination of components illustrated in the exemplary operatingenvironment 100.

[0016] With reference to FIG. 1, an exemplary system for implementingthe invention includes a general purpose computing device in the form ofa computer 110. Components of computer 110 may include, but are notlimited to, a processing unit 120, a system memory 130, and a system bus121 that couples various system components including the system memoryto the processing unit 120. The system bus 121 may be any of severaltypes of bus structures including a memory bus or memory controller, aperipheral bus, and a local bus using any of a variety of busarchitectures. By way of example, and not limitation, such architecturesinclude Industry Standard Architecture (ISA) bus, Micro ChannelArchitecture (MCA) bus, Enhanced ISA (EISA) bus, Video ElectronicsStandards Association (VESA) local bus, and Peripheral ComponentInterconnect (PCI) bus (also known as Mezzanine bus).

[0017] Computer 110 typically includes a variety of computer readablemedia. Computer readable media can be any available media that can beaccessed by computer 110 and includes both volatile and nonvolatilemedia, removable and non-removable media. By way of example, and notlimitation, computer readable media may comprise computer storage mediaand communication media. Computer storage media includes both volatileand nonvolatile, removable and non-removable media implemented in anymethod or technology for storage of information such as computerreadable instructions, data structures, program modules or other data.Computer storage media includes, but is not limited to, RAM, ROM,EEPROM, flash memory or other memory technology, CDROM, digitalversatile disks (DVD) or other optical disk storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can be accessed by computer 110. Communication media typicallyembodies computer readable instructions, data structures, programmodules or other data in a modulated data signal such as a carrier waveor other transport mechanism and includes any information deliverymedia. The term “modulated data signal” means a signal that has one ormore of its characteristics set or changed in such a manner as to encodeinformation in the signal. By way of example, and not limitation,communication media includes wired media such as a wired network ordirect-wired connection, and wireless media such as acoustic, RF,infrared, and other wireless media. Combinations of any of the aboveshould also be included within the scope of computer readable media.

[0018] The system memory 130 includes computer storage media in the formof volatile and/or nonvolatile memory such as read only memory (ROM) 131and random access memory (RAM) 132. A basic input/output system 133(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 110, such as during start-up, istypically stored in ROM 131. RAM 132 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 120. By way of example, and notlimitation, FIG. 1 illustrates operating system 134, applicationprograms 135, other program modules 136, and program data 137.

[0019] The computer 110 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 1 illustrates a hard disk drive 141 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 151that reads from or writes to a removable, nonvolatile magnetic disk 152,and an optical disk drive 155 that reads from or writes to a removable,nonvolatile optical disk 156, such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment include,but are not limited to, magnetic tape cassettes, flash memory cards,digital versatile disks, digital video tape, solid state RAM, solidstate ROM, and the like. The hard disk drive 141 is typically connectedto the system bus 121 through a non-removable memory interface such asinterface 140, and magnetic disk drive 151 and optical disk drive 155are typically connected to the system bus 121 by a removable memoryinterface, such as interface 150.

[0020] The drives and their associated computer storage media discussedabove and illustrated in FIG. 1 provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 110. In FIG. 1, for example, hard disk drive 141 is illustratedas storing operating system 144, application programs 145, other programmodules 146, and program data 147. Note that these components can eitherbe the same as or different from operating system 134, applicationprograms 135, other program modules 136, and program data 137. Operatingsystem 144, application programs 145, other program modules 146, andprogram data 147 are given different numbers here to illustrate that, ata minimum, they are different copies. A user may enter commands andinformation into the computer 110 through input devices such as akeyboard 162 and pointing device 161, commonly referred to as a mouse,trackball or touch pad. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit120 through a user input interface 160 that is coupled to the system bus121, but may be connected by other interface and bus structures, such asa parallel port, game port or a universal serial bus (USB).

[0021] A monitor 191 or other type of display device is also connectedto the system bus 121 via an interface, such as a video interface 190. Agraphics interface 182, such as Northbridge, may also be connected tothe system bus 121. Northbridge is a chipset that communicates with theCPU, or host processing unit 120, and assumes responsibility foraccelerated graphics port (AGP) communications. One or more graphicsprocessing units (GPUs) 184 may communicate with graphics interface 182.In this regard, GPUs 184 generally include on-chip memory storage, suchas register storage and GPUs 184 communicate with a video memory 186.GPUs 184, however, are but one example of a coprocessor and thus avariety of coprocessing devices may be included in computer 110. Amonitor 191 or other type of display device is also connected to thesystem bus 121 via an interface, such as a video interface 190, whichmay in turn communicate with video memory 186. In addition to monitor191, computers may also include other peripheral output devices such asspeakers 197 and printer 196, which may be connected through an outputperipheral interface 195.

[0022] The computer 110 may operate in a networked environment usinglogical connections to one or more remote computers, such as a remotecomputer 180. The remote computer 180 may be a personal computer, aserver, a router, a network PC, a peer device or other common networknode, and typically includes many or all of the elements described aboverelative to the computer 110, although only a memory storage device 181has been illustrated in FIG. 1. The logical connections depicted in FIG.1 include a local area network (LAN) 171 and a wide area network (WAN)173, but may also include other networks. Such networking environmentsare commonplace in offices, enterprise-wide computer networks, intranetsand the Internet.

[0023] When used in a LAN networking environment, the computer 110 isconnected to the LAN 171 through a network interface or adapter 170.When used in a WAN networking environment, the computer 110 typicallyincludes a modem 172 or other means for establishing communications overthe WAN 173, such as the Internet. The modem 172, which may be internalor external, may be connected to the system bus 121 via the user inputinterface 160, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the computer 110, orportions thereof, may be stored in the remote memory storage device. Byway of example, and not limitation, FIG. 1 illustrates remoteapplication programs 185 as residing on memory device 181. It will beappreciated that the network connections shown are exemplary and othermeans of establishing a communications link between the computers may beused.

[0024] One of ordinary skill in the art can appreciate that a computer110 or other client device can be deployed as part of a computernetwork. In this regard, the present invention pertains to any computersystem having any number of memory or storage units, and any number ofapplications and processes occurring across any number of storage unitsor volumes. The present invention may apply to an environment withserver computers and client computers deployed in a network environment,having remote or local storage. The present invention may also apply toa standalone computing device, having programming languagefunctionality, interpretation and execution capabilities.

[0025] Context-Sensitive Help in a Development Environment

[0026] A context-sensitive design-time tool dynamically monitors user(e.g., developer) input during software development. When the toolintelligently determines a potential next task or tasks, an icon isgenerated. Upon selection of the icon, a list of potential next task(s)is displayed. Upon selection of an entry, the task is automaticallyperformed. Automatically-performed tasks include, but are not limitedto, automatically inserting code into a source program.

[0027]FIG. 2 is a block diagram illustrating an exemplary system formonitoring user input and proffering a list of potential next tasks inaccordance with one embodiment of the invention. The system includes acontext-sensitive potential next task determiner 205, a file/database203 (optional), a language service 204 and an editor 202 within a designenvironment 201 for drafting and editing source code 206. Those ofordinary skill in the art will appreciate that the design environment201 may also include other components, not shown in FIG. 2. Source code206 typically is a set of instructions that a programmer or developertypes or edits, and is written in a given programming language orcombination of programming languages. Source code typically comprisesone or more statements, each statement typically comprising one or moreexpressions and/or entities. The expressions and/or entities in thestatement can be made up of multiple components. Source code 206 may bepersisted onto a stable storage medium.

[0028] Editor 202 in one embodiment is part of an Integrated DevelopmentEnvironment (IDE) 201, and facilitates the development of the sourcecode 206 of a computer program. Editor 202 may be a C++ editor, a C#editor, a Visual Basic editor, a J# editor or the like.

[0029] Language service 204 may be optimized for use with Visual C++code, with Visual C# code, with Visual Basic code, with Visual Java#code or the like. The programming languages anticipated for inclusion inthe list of available language services includes the above mentioned,COBOL and any other suitable languages associated with programdevelopment.

[0030] Language service 204 may include a dynamic parser as described inU.S. Pat. No. 6,367,068 B1 issued on Apr. 2, 2002, entitled “DynamicParsing”. Such a parser may operate to parse the source code 206according to the parsing rules applicable to the programming language(e.g., a C++ parser, a C# parser, a Visual Basic parser, a J# parser orthe like). The parser may parse only a subset of the source code, (e.g.,the current function or method being edited). The parser may includeheuristics to ignore certain non-fatal errors, such as but not limitedto missing statement terminators, missing closing parenthesis, missingfunction terminators and the like. Similarly language service 204 mayinclude an automatic statement completion module, an automated helpmodule and/or a statement building and information tool as describedabove.

[0031] Language service 204 may include a compiler, such as but notlimited to, a C++ compiler, a C# compiler, a Visual Basic compilerand/or a J# compiler. Typically a compiler includes a parser and acomponent that builds executable code. A parser receives input in theform of sequential source program instructions, interactive onlinecommands, markup tags, or some other defined interface and breaks themup into parts. For example a parser may break source code into nouns(objects), verbs (methods), and their attributes or options. A parsermay also check to see that all necessary input has been provided.

[0032] Language service 204 preferably includes context-sensitive tool205. Alternatively, the context-sensitive tool may exist external tolanguage service 204. The context-sensitive next-task help tool 205parses user keystrokes for a triggering character or sequence ofcharacters, as the keystrokes are input. Upon detection of a triggeringcharacter or sequence of characters, the tool determines potential nexttasks.

[0033] For example, in the case of adding method stubs to an interface,entering the interface name as part of the class definition is thetriggering event.

[0034] For example, suppose the user types:

[0035] class CFoo : public IBar

[0036] the input of “IBar” following “class Cfoo : public ” triggers thedisplay of an icon. Upon further user input, as described below, theautomatic addition of stubs for all the methods of IBar can be effected.

[0037] As another example, assume that a developer has written aninterface such as the following: interface IEmployee { string Name {get; set; } int Age { get; set; } }

[0038] Assume also, that the developer has written several classes thatimplement this interface. Each of these classes therefore have a ‘Name’property and an ‘Age’ property, as required by the contract of theinterface.

[0039] Next, say the developer realizes that the IEmployee interfacealso needs a ‘Salary’ property. Using the code editor, the developer maychange the interface to look like this: interface IEmployee { stringName { get; set; } int Age { get; set; } decimal Salary { get; set; } }

[0040] At the point when the newly added property is complete in theeditor, an icon would appear, and when clicked or otherwise selected, anoption to automatically add stub implementations of the ‘Salary’property to all classes that implement Iemployee would be displayed.

[0041] Another exemplary triggering sequence is usage of some specificAPI (Application Programming Interface) such as “SQLConnect”. Entering“SQLConnect” indicates that the next set of tasks to be performed is touse the SQL connection to retrieve or input data to the database. Itshould be understood that the particular examples are exemplary only andother suitable triggering sequences are contemplated.

[0042] In determining potential next tasks, file/database 203 may beaccessed. File/database 203 may include information on entities in thesource code. File/database 203 typically is a file comprising a databasethat, in one embodiment of the invention, is used by the parser to storeinformation including, but not limited to, class definitions, memberdata types, and reference information such as source file names and linenumbers where an identifier, token, or function name is defined orreferenced, as described in co-pending application Attorney Docket No.MSFT-1249 filed concurrently herewith, entitled “System and Method forBrowse Information Parsing Without Compilation”, and is populated andmaintained by the parser. File/database 203 typically also includesinformation not only from source code 206, but also includes informationfrom other sources including system header files, Microsoft FoundationClass (MFC) header files and ActiveX Template Libraries (ATL), all ofwhich are known in the art. In one embodiment of the invention,file/database 203 is referred to as a No Compile Browse (NCB) file.File/database 203 may include a compiler symbol table (for example, a C#or J# symbol table stored in a database), or a separate file (forexample, a C++ file generated by a portion of the language service 204).Alternatively, a file or database in memory (not shown) may be accessed,(for example, a Visual Basic compiler symbol table stored in a databasein memory). Tables, files, databases and the like, whether stored inmemory on persisted to a stable storage medium are contemplated by theinvention. Alternatively, file/database 203 while appearing as onedatabase to the user, actually may be comprised of multiple stores ordatabases. For example, a first database (e.g., a project database) maybe dynamically updated by the parser, as described above. In addition,the pre-built database may contain information that seldom changes, suchas the operating system definitions and header files, and MFC/ATL classdefinitions and header files referred to above. Those of ordinary skillin the art will recognize that other class definitions and header filescould be included in the pre-built database. One or more pre-builtdatabases may exist.

[0043] Continuing the example described above, in which method stubs foran interface can be automatically generated, assume the following lineof code was entered:

[0044] class CFoo : public IBar

[0045] Upon entering “IBar” following “class CFoo : public ”, themethods of IBar are retrieved by accessing database 203. In this casedatabase 203 includes a list of all the methods of IBar.

[0046] As another example, assume the developer is authoring a newclass, and declares it to implement an interface called ‘IEnumerable’.At this point in accordance with one embodiment of the invention, anicon would be displayed, which, upon selection, provides an entryoffering to provide stub implementations of all the members ofIEnumerable to the new class, since that is a requirement ofimplementing the interface. The database 203 contains the informationabout the interface IEnumerable, including the names and signatures ofthe methods it has, what interfaces it extends, etc. It should beunderstood that the examples recited above are exemplary only and anysuitable content for and use of database 203 is contemplated by theinvention.

[0047] Thus, in accordance with one embodiment of the invention, thesystem of FIG. 2 operates as follows. A user (e.g., a developer) draftssource code 206 with editor 202. As the developer generates the sourcecode 206, one of the components of IDE 201 detects an event and invokescontext-sensitive help module 205. Context-sensitive help module 205then displays an icon. If the icon is selected, context-sensitive helpmodule 205 parses the code fragment using information from file/database203 to provide context-sensitive choices to the developer concerningpotential next-tasks. Upon selection of one or more entries, the task ortasks associated with the entry or entries is performed. In oneembodiment of the invention, the event invoking the context-sensitivehelp module 205 is the entry of certain pre-determinedprogramming-language-defined constructs.

[0048] The icon in one embodiment of the invention is displayed in theeditor near the triggering character or sequence of characters. Inresponse to user selection of the icon by positioning a cursor over theicon or by selecting the icon in other ways known in the art, a windowis generated, displaying a list. The list preferably includes one ormore potential next task(s). Upon selection of an entry or a series ofentries in the list by clicking on the entry (or entries) or byselecting the entry (or entries) using other ways known in the art, thetask associated with the list entry is automatically performed.

[0049]FIG. 3 is a block diagram illustrating a representative screenshot of a section of source code in an editor, showing the appearance ofan icon in accordance with one aspect of the invention. FIG. 4 is ablock diagram illustrating a representative screen shot of a section ofsource code in an editor, showing a list of potential tasks inaccordance with one aspect of the invention.

[0050] Within a design environment such as an Integrated DesignEnvironment (IDE) 201, a C++ editor 202 enables the creation or editingof C++ source code 306 as depicted in window 308. Source code 306 isdisplayed within window 308. Context-sensitive help tool 205 generatesicon 302 when triggered by the keystrokes input by the user. Uponselection of icon 302, icon 302 is dismissed and a list 402 of potentialtasks is displayed.

[0051] For example, assume that a developer is writing C++ code usingthe C++ language service 202. Assume a public interface class: “IFoo”exists in database 203, interface IFoo having two member methods,method1 and method2. Because IFoo is an interface, method1 and method2are pure methods and are not implemented. If, for example, a user types“class MyClass : public IFoo {” into source code 306, thecontext-sensitive tool will detect that the user may intend to implementthe IFoo interface so that the pure virtual methods of IFoo will need tobe overridden in MyClass. Context-sensitive help tool 205 is triggeredby the colon, the colon indicating to the tool 205 that the word thatfollows, (i.e., “IFoo”) probably is a class such as an interface or baseclass). The tool includes heuristics for determining possible next tasks(i.e., implement the interface by overriding any pure methods ofinterface IFoo) and thereby determines that the user will probably wantto write function bodies for method1 and method2. Upon determining thepossible next task or tasks, the tool displays an icon 302 in thevicinity of the user input, indicating that a potential next task hasbeen determined. Upon selection of the icon by hovering the cursor overthe icon, or otherwise selecting the icon using methods known in theart, the user is prompted with a statement such as but not limited to:“Do you want to implement stubs for interface IFoo?”. Upon selection ofthe entry, or otherwise indicating assent, using methods known in theart, the function body stub code would be automatically generated in theuser's source code instance. For example, in this case, the followingcode may be generated: void method1 () { } void method2 () { }

[0052] eliminating the need for the user to type in this code, andeliminating any mistakes the user might make in the process, andpotentially increasing the productivity of the developer.

[0053] In the case of MFC/ATL in C++, accepting the icon's changespreferably would also involve making the appropriate changes to the COMmap, a macro wrapped structure used to track all the interfacesimplemented by a given class. While the example above relates tointerfaces, it will be understood that the tool is intended to handleregular base classes as well as interfaces. With base classes, a subsetor all of the base's virtual methods can be overridden.

[0054] Similarly, it should be understood that although the aboveexample is simple, to aid in understanding, the generation of code isnot restricted to beginning and ending braces. For example, perhapsmethod1 is defined with attribute “integer”. In this case, the returntype, in accordance with C++ programming conventions, is an integer,which is reflected in the code generated by the tool. For example, inthis case, the tool may generate the following: int method1 () { return0; }

[0055] Alternatively, the return type may be HRESULT, resulting ingeneration of: HRESULT method1 () { result S_OK; }

[0056] Similarly, if method1 has an input parameter of int i and anoutput parameter of an integer pointer, (method1 ([in] int i, [out] int*p); the tool may generate code to make sure that p is not equal tonull, and may initialize the pointer so that the following may begenerated by the tool: HRESULT method1 (int i, int *p); { assert (p ≠null); *p=0; }

[0057] As much of the function body can be generated as can bedetermined from the information available. In addition, for example,address modifiers and parameters and the like can be generated.

[0058] As another example, in C#, interfaces may be implemented publiclyor privately. When stubs are generated, methods can be marked private,in which case the method can only be called by casting an object to thatspecific interface. The context-sensitive tool provides the option ofgenerating either.

[0059] When typing code to make a connection to a database (e.g.,SQL/OleDB), the context-sensitive tool generates code to retrieve adataset and subsequently close the database, using ATL or SQL or othersuitable database-handling languages. For example, suppose a user typesthe following connection string into source code:

[0060] SQL Connect (“Database=MySQL, user=Shankar, PWD=“hello”).

[0061] The context-sensitive tool, triggered in this case by thereference to a database and user followed by the sequence of letter“PWD”, denoting “password”, generates an icon which, when selected,proffers the option of hiding the password in a registry, for example.Upon selection of the option, code including that code needed to createthe necessary user classes, etc. is generated, the appropriate existingcode is removed and replaced with the tool-generated code.

[0062] When typing code, if a user sees a squiggly, a wavy line commonlyused to denote an error condition of some sort, and hovers over thesquiggly, the context-sensitive tool preferably generates an iconproffering ways to correct the code. The fix may include adding amissing semicolon or closing brace, or identifying and correcting atypographical error in an undefined type. Alternatively, Knowledge Base(KB) articles (a good source of information regarding common issues orquestions) or websites such as www.msdn.com may be accessed byestablishing a connection to the Internet to identify an appropriatecorrection.

[0063] When typing in a declaration of a function or method or otherelement, implementation can be automatically generated by accessingfiles generated by a compiler or dynamic parser.

[0064] Wizards presently invoked by identifying a correct node andright-clicking on classview followed by filling in requested informationare preferably eliminated by providing an option in the list to performthe task previously performed by the wizard.

[0065] Preferably, the IDE is open such that third parties can authortheir own language services, thereby augmenting the features of thestandard text editor to conform to their language (such as colorizationof their syntax elements, providing formatting and automatic indentcapabilities, and the like). Language services are also employed in theenvironment to provide information to the various browsers and helpsystems, and also to provide useful information to the debugger ifappropriate. In the context of this invention, the language service isgiven the opportunity to make use of the context-sensitive helpfunctionality in accordance with one embodiment of the invention so asto present the “next-task” options while editing.

[0066]FIG. 5 is a flow diagram of a method of providingcontext-sensitive help in accordance with one embodiment of theinvention. At step 501, as source code is entered or edited, eachkeystroke or sequence of keystrokes is parsed to determine if thekeystroke or sequence of keystrokes is a context-sensitive help trigger.

[0067] At step 503, if it is determined that the keystroke or sequenceof keystrokes is not a context-sensitive help trigger, processingreturns to step 501. At step 503, if it is determined that the keystrokeor sequence of keystrokes is a context-sensitive help trigger, acontext-sensitive help icon is generated and displayed close to thetriggering keystroke(s) at step 505. At step 507, if the icon is notselected within a designated time period, the icon is dismissed at step509 and processing returns to step 501. At step 507, if the icon isselected, a list of entries is generated and displayed at step 511. Thelist of entries includes possible next actions that a user might take.If one or more of the entries is selected at step 513, the actionassociated with the entry or entries is performed at step 515 and asection of code within a source code file may be added or a section ofcode originally included within the source code file may be removed andreplaced with a section of code generated by the context-sensitive helpengine or a section of code originally included within the source codefile may be modified.

[0068] For example, suppose a user is modifying thedeclaration/definition of a type or method, an icon may be displayed.Upon selection of the icon, an entry may be displayed suggesting tomodify all the places where the type/method is being referenced. Uponselection of the action, all the places where the type/method arereferenced are modified. It should be understood that the example citedis merely exemplary and any suitable actions and entries arecontemplated by the invention.

[0069] If an entry is not selected at step 513, the list is dismissed atstep 517, after a specified period of time or upon positioning thecursor elsewhere, and processing returns to step 501.

CONCLUSION

[0070] It is noted that the foregoing examples have been provided merelyfor the purpose of explanation and are in no way to be construed aslimiting of the present invention. While the invention has beendescribed with reference to various embodiments, it is understood thatthe words which have been used herein are words of description andillustration, rather than words of limitation. Further, although theinvention has been described herein with reference to particular means,materials and embodiments, the invention is not intended to be limitedto the particulars disclosed herein; rather, the invention extends toall functionally equivalent structures, methods and uses, such as arewithin the scope of the appended claims. Those skilled in the art,having the benefit of the teachings of this specification, may effectnumerous modifications thereto and changes may be made without departingfrom the scope and spirit of the invention in its aspects.

What is claimed is:
 1. A method of providing context-sensitive help forpotential next-tasks in a development environment, the methodcomprising: displaying at least a section of source code for a computerprogram, said section of source code including an entity associated witha pre-determined event; detecting the pre-determined event; determiningat least one potential task associated with the pre-determined event;and displaying an icon proximate to the at least one section of sourcecode.
 2. The method of claim 1, further comprising: upon selection ofthe icon, displaying at least one entry associated with an action. 3.The method of claim 2, further comprising, upon selection of the atleast one entry, performing the action associated with the at least oneentry.
 4. The method of claim 3, wherein performing the actionassociated with the at least one entry comprises inserting a section ofcode into the source program.
 5. The method of claim 3, whereinperforming the action associated with the at least one entry comprisesremoving a section of code from the source program.
 6. The method ofclaim 3, wherein performing the action associated with the at least oneentry comprises modifying a section of code from the source program. 7.The method of claim 3, wherein performing the action associated with theat least one entry comprises modifying a file associated with theaction.
 8. The method of claim 1, wherein the section of source code isdisplayed utilizing an editor.
 9. The method of claim 1, wherein thepre-determined event comprises detecting entry of one of a triggeringcharacter or a triggering sequence of characters.
 10. The method ofclaim 9, wherein the triggering character or triggering sequence ofcharacters is a separator.
 11. The method of claim 1, wherein the iconis selectable by one of hovering a cursor over the icon and clicking onthe icon.
 12. The method of claim 2, wherein the at least one entry isdisplayed proximate to the section of source code.
 13. The method ofclaim 2, wherein the at least one entry is selectable by clicking on theentry.
 14. A system for providing context-sensitive help in adevelopment environment for potential next tasks in a developmentenvironment, the system comprising: an editor to provide for developingsource code for a computer, the source code including at least oneentity; a datastore including information associated with the at leastone entity; a language service for parsing the source code andgenerating information for the datastore; and an option-generator fordetermining at least one potential next task.
 15. The system of claim14, wherein the language service further comprises a C++ parser.
 16. Thesystem of claim 14, wherein the language service comprises a C# parser.17. The system of claim 14, wherein the language service comprises a J#parser.
 18. The system of claim 14, wherein the language servicecomprises a Visual Basic parser.
 19. The system of claim 14, wherein theoption-generator includes a set of heuristics for determining potentialnext tasks.
 20. The system of claim 14, wherein the datastore includes adynamically updated component and a pre-built component.
 21. The systemof claim 14, wherein the option-generator further comprises means fordisplaying an icon next to the modifiable code.
 22. The system of claim14, wherein the option-generator further comprises means for selectingat least one of a list of next tasks to be performed, the at least oneof the list associated with inserting code in a source program.
 23. Thesystem of claim 22, further comprising inserting the code associatedwith the selected one of the list of next tasks into the source program.24. A computer-readable medium including computer-executableinstructions for: developing at least a section of source code for acomputer program, said section of source code including an entityassociated with a pre-determined event; detecting the pre-determinedevent; determining at least one potential task associated with thepre-determined event; displaying an icon proximate to the at least onesection of source code; and upon selection of the icon, displaying atleast one entry associated with an action.
 25. The computer-readablemedium of claim 24, further comprising computer-readable instructionsfor in response to receiving a selection of the at least one entry,performing the action associated with the at least one entry.